const Koa = require("koa");
const fs = require("fs");
const path = require("path");
const app = new Koa();
const koaBody = require("koa-body"); //解析上传文件的插件
const statics = require("koa-static");
const router = require("koa-router")({
  prefix: "/api",
});
app.use(
  koaBody({
    multipart: true,
    formidable: {
      multipart: true,
      maxFileSize: 10 * 1024 * 1024,
    },
  })
);

app.use(statics(path.resolve("./mockServer")));

function uploadHandler(file, urls) {
  const uploadFile = path.resolve("./mockServer/upload");
  if (!fs.existsSync(uploadFile)) {
    fs.mkdirSync(uploadFile);
  }
  const reader = fs.createReadStream(file.path);
  const ext = file.name.split(".").pop();
  const fileName = `${Math.random().toString()}.${ext}`;
  const upStream = fs.createWriteStream(`${uploadFile}/${fileName}`);
  reader.pipe(upStream);
  urls.push(`http://127.0.0.1:7878/upload/${fileName}`);
}

router.post("/upload", async (ctx) => {
  const file = ctx.request.files.file;
  let urls = [];
  if (Array.isArray(file)) {
    file.map((f) => {
      uploadHandler(f, urls);
    });
  } else {
    uploadHandler(file, urls);
  }

  return (ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      urls,
    },
  });
});

router.post("/system/user/login", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      username: "张三",
      accessToken: "86c31151c2bb98f6b6e28c30d95fb29e61d68888",
      avatar:
        "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3230694030,3007022983&fm=26&gp=0.jpg",
    },
  };
});

router.get("/system/getMenu", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: [
      {
        path: "/dashboard",
        name: "首页",
      },
      {
        path: "/shopDecoration",
        name: "营销管理",
        children: [
          {
            path: "h5ShopDecoration",
            name: "移动端店铺管理",
          },
          {
            path: "pcShopDecoration",
            name: "PC端店铺管理",
          },
          {
            path: "h5ShopDecorationEdit/:id",
            name: "移动端店铺装修",
          },
          {
            path: "pcShopDecorationEdit/:id",
            name: "PC端店铺装修",
          },
        ],
      },
      {
        path: "/system",
        name: "系统管理",
        children: [
          {
            path: "user",
            name: "用户管理",
          },
          {
            path: "role",
            name: "角色管理",
          },
          {
            path: "permission",
            name: "权限管理",
          },
          {
            path: "department",
            name: "部门管理",
          },
          {
            path: "jobs",
            name: "岗位管理",
          },
          {
            path: "dictionary",
            name: "字典管理",
          },
          {
            path: "dictionaryData/:id",
            name: "字典数据管理",
          },
          {
            path: "userProfile",
            name: "个人中心",
          },
        ],
      },
    ],
  };
});

router.get("/system/permissions", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      permissions: ["user"],
      roles: ["admin"],
    },
  };
});

router.get("/system/post/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 4,
      list: [
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 1,
          postCode: "ceo",
          postName: "董事长",
          postSort: "1",
          status: "1",
          flag: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 2,
          postCode: "se",
          postName: "项目经理",
          postSort: "2",
          status: "1",
          flag: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 3,
          postCode: "hr",
          postName: "人力资源",
          postSort: "3",
          status: "1",
          flag: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 4,
          postCode: "user",
          postName: "普通员工",
          postSort: "4",
          status: "1",
          flag: false,
        },
      ],
    },
  };
});

router.post("/system/post", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/post", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/post", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.get("/system/dept/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      list: [
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 100,
          parentId: 0,
          ancestors: "0",
          deptName: "天领科技",
          orderNum: "0",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 101,
          parentId: 100,
          ancestors: "0,100",
          deptName: "深圳总公司",
          orderNum: "1",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 102,
          parentId: 100,
          ancestors: "0,100",
          deptName: "长沙分公司",
          orderNum: "2",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 103,
          parentId: 101,
          ancestors: "0,100,101",
          deptName: "研发部门",
          orderNum: "1",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 104,
          parentId: 101,
          ancestors: "0,100,101",
          deptName: "市场部门",
          orderNum: "2",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 105,
          parentId: 101,
          ancestors: "0,100,101",
          deptName: "测试部门",
          orderNum: "3",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 106,
          parentId: 101,
          ancestors: "0,100,101",
          deptName: "财务部门",
          orderNum: "4",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 107,
          parentId: 101,
          ancestors: "0,100,101",
          deptName: "运维部门",
          orderNum: "5",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 108,
          parentId: 102,
          ancestors: "0,100,102",
          deptName: "市场部门",
          orderNum: "1",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          deptId: 109,
          parentId: 102,
          ancestors: "0,100,102",
          deptName: "财务部门",
          orderNum: "2",
          leader: "天领",
          phone: "15888888888",
          email: "hulei@qq.com",
          status: "1",
          delFlag: "0",
          parentName: null,
          children: [],
        },
      ],
    },
  };
});

router.post("/system/dept", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/dept", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/dept/:id", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.post("/system/userList", async (ctx) => {
  console.log(ctx.request);
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 100,
      list: [
        {
          date: "2016-05-03",
          name: "王小虎1",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-02",
          name: "王小虎2",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎3",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎4",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-08",
          name: "王小虎5",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-06",
          name: "王小虎6",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-07",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎1",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-02",
          name: "王小虎2",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎3",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎4",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-08",
          name: "王小虎5",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-06",
          name: "王小虎6",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-07",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
    },
  };
});

router.get("/system/dict/type/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 10,
      list: [
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "用户性别列表",
          params: {},
          dictId: 1,
          dictName: "用户性别",
          dictType: "sys_user_sex",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "菜单状态列表",
          params: {},
          dictId: 2,
          dictName: "菜单状态",
          dictType: "sys_show_hide",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "系统开关列表",
          params: {},
          dictId: 3,
          dictName: "系统开关",
          dictType: "sys_normal_disable",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "任务状态列表",
          params: {},
          dictId: 4,
          dictName: "任务状态",
          dictType: "sys_job_status",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "任务分组列表",
          params: {},
          dictId: 5,
          dictName: "任务分组",
          dictType: "sys_job_group",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "系统是否列表",
          params: {},
          dictId: 6,
          dictName: "系统是否",
          dictType: "sys_yes_no",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "通知类型列表",
          params: {},
          dictId: 7,
          dictName: "通知类型",
          dictType: "sys_notice_type",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "通知状态列表",
          params: {},
          dictId: 8,
          dictName: "通知状态",
          dictType: "sys_notice_status",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "操作类型列表",
          params: {},
          dictId: 9,
          dictName: "操作类型",
          dictType: "sys_oper_type",
          status: "1",
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "登录状态列表",
          params: {},
          dictId: 10,
          dictName: "系统状态",
          dictType: "sys_common_status",
          status: "1",
        },
      ],
    },
  };
});

router.post("/system/dict/type", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/dict/type", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/dict/type", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.get("/system/dict/type/data/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 3,
      list: [
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "性别男",
          params: {},
          dictCode: 1,
          dictSort: 1,
          dictLabel: "男",
          dictValue: "0",
          dictType: "sys_user_sex",
          cssClass: "",
          listClass: "",
          isDefault: "Y",
          status: "1",
          default: true,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "性别女",
          params: {},
          dictCode: 2,
          dictSort: 2,
          dictLabel: "女",
          dictValue: "1",
          dictType: "sys_user_sex",
          cssClass: "",
          listClass: "",
          isDefault: "N",
          status: "1",
          default: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:49",
          updateBy: null,
          updateTime: null,
          remark: "性别未知",
          params: {},
          dictCode: 3,
          dictSort: 3,
          dictLabel: "未知",
          dictValue: "2",
          dictType: "sys_user_sex",
          cssClass: "",
          listClass: "",
          isDefault: "N",
          status: "1",
          default: false,
        },
      ],
    },
  };
});

router.post("/system/dict/data/type", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/dict/data/type", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/dict/data/type", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.get("/system/menu/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      list: [
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1,
          menuName: "系统管理",
          parentName: null,
          parentId: 0,
          orderNum: "1",
          path: "system",
          component: null,
          isFrame: "1",
          isCache: "0",
          menuType: "M",
          visible: "0",
          status: "1",
          perms: "",
          icon: "system",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 2,
          menuName: "系统监控",
          parentName: null,
          parentId: 0,
          orderNum: "2",
          path: "monitor",
          component: null,
          isFrame: "1",
          isCache: "0",
          menuType: "M",
          visible: "0",
          status: "1",
          perms: "",
          icon: "monitor",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 3,
          menuName: "系统工具",
          parentName: null,
          parentId: 0,
          orderNum: "3",
          path: "tool",
          component: null,
          isFrame: "1",
          isCache: "0",
          menuType: "M",
          visible: "0",
          status: "1",
          perms: "",
          icon: "tool",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 100,
          menuName: "用户管理",
          parentName: null,
          parentId: 1,
          orderNum: "1",
          path: "user",
          component: "system/user/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:user:list",
          icon: "user",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 101,
          menuName: "角色管理",
          parentName: null,
          parentId: 1,
          orderNum: "2",
          path: "role",
          component: "system/role/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:role:list",
          icon: "peoples",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 102,
          menuName: "菜单管理",
          parentName: null,
          parentId: 1,
          orderNum: "3",
          path: "menu",
          component: "system/menu/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:menu:list",
          icon: "tree-table",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 103,
          menuName: "部门管理",
          parentName: null,
          parentId: 1,
          orderNum: "4",
          path: "dept",
          component: "system/dept/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:dept:list",
          icon: "tree",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 104,
          menuName: "岗位管理",
          parentName: null,
          parentId: 1,
          orderNum: "5",
          path: "post",
          component: "system/post/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:post:list",
          icon: "post",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 105,
          menuName: "字典管理",
          parentName: null,
          parentId: 1,
          orderNum: "6",
          path: "dict",
          component: "system/dict/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:dict:list",
          icon: "dict",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 106,
          menuName: "参数设置",
          parentName: null,
          parentId: 1,
          orderNum: "7",
          path: "config",
          component: "system/config/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:config:list",
          icon: "edit",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 107,
          menuName: "通知公告",
          parentName: null,
          parentId: 1,
          orderNum: "8",
          path: "notice",
          component: "system/notice/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "system:notice:list",
          icon: "message",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 108,
          menuName: "日志管理",
          parentName: null,
          parentId: 1,
          orderNum: "9",
          path: "log",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "M",
          visible: "0",
          status: "1",
          perms: "",
          icon: "log",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 109,
          menuName: "在线用户",
          parentName: null,
          parentId: 2,
          orderNum: "1",
          path: "online",
          component: "monitor/online/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:online:list",
          icon: "online",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 110,
          menuName: "定时任务",
          parentName: null,
          parentId: 2,
          orderNum: "2",
          path: "job",
          component: "monitor/job/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:job:list",
          icon: "job",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 111,
          menuName: "数据监控",
          parentName: null,
          parentId: 2,
          orderNum: "3",
          path: "druid",
          component: "monitor/druid/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:druid:list",
          icon: "druid",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 112,
          menuName: "服务监控",
          parentName: null,
          parentId: 2,
          orderNum: "4",
          path: "server",
          component: "monitor/server/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:server:list",
          icon: "server",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 113,
          menuName: "缓存监控",
          parentName: null,
          parentId: 2,
          orderNum: "5",
          path: "cache",
          component: "monitor/cache/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:cache:list",
          icon: "redis",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 114,
          menuName: "表单构建",
          parentName: null,
          parentId: 3,
          orderNum: "1",
          path: "build",
          component: "tool/build/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "tool:build:list",
          icon: "build",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 115,
          menuName: "代码生成",
          parentName: null,
          parentId: 3,
          orderNum: "2",
          path: "gen",
          component: "tool/gen/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "tool:gen:list",
          icon: "code",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 116,
          menuName: "系统接口",
          parentName: null,
          parentId: 3,
          orderNum: "3",
          path: "swagger",
          component: "tool/swagger/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "tool:swagger:list",
          icon: "swagger",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1001,
          menuName: "用户查询",
          parentName: null,
          parentId: 100,
          orderNum: "1",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1002,
          menuName: "用户新增",
          parentName: null,
          parentId: 100,
          orderNum: "2",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1003,
          menuName: "用户修改",
          parentName: null,
          parentId: 100,
          orderNum: "3",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1004,
          menuName: "用户删除",
          parentName: null,
          parentId: 100,
          orderNum: "4",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1005,
          menuName: "用户导出",
          parentName: null,
          parentId: 100,
          orderNum: "5",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1006,
          menuName: "用户导入",
          parentName: null,
          parentId: 100,
          orderNum: "6",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:import",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1007,
          menuName: "重置密码",
          parentName: null,
          parentId: 100,
          orderNum: "7",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:user:resetPwd",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1008,
          menuName: "角色查询",
          parentName: null,
          parentId: 101,
          orderNum: "1",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:role:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1009,
          menuName: "角色新增",
          parentName: null,
          parentId: 101,
          orderNum: "2",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:role:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1010,
          menuName: "角色修改",
          parentName: null,
          parentId: 101,
          orderNum: "3",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:role:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1011,
          menuName: "角色删除",
          parentName: null,
          parentId: 101,
          orderNum: "4",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:role:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1012,
          menuName: "角色导出",
          parentName: null,
          parentId: 101,
          orderNum: "5",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:role:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1013,
          menuName: "菜单查询",
          parentName: null,
          parentId: 102,
          orderNum: "1",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:menu:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1014,
          menuName: "菜单新增",
          parentName: null,
          parentId: 102,
          orderNum: "2",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:menu:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1015,
          menuName: "菜单修改",
          parentName: null,
          parentId: 102,
          orderNum: "3",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:menu:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1016,
          menuName: "菜单删除",
          parentName: null,
          parentId: 102,
          orderNum: "4",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:menu:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1017,
          menuName: "部门查询",
          parentName: null,
          parentId: 103,
          orderNum: "1",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dept:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1018,
          menuName: "部门新增",
          parentName: null,
          parentId: 103,
          orderNum: "2",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dept:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1019,
          menuName: "部门修改",
          parentName: null,
          parentId: 103,
          orderNum: "3",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dept:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1020,
          menuName: "部门删除",
          parentName: null,
          parentId: 103,
          orderNum: "4",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dept:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1021,
          menuName: "岗位查询",
          parentName: null,
          parentId: 104,
          orderNum: "1",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:post:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1022,
          menuName: "岗位新增",
          parentName: null,
          parentId: 104,
          orderNum: "2",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:post:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1023,
          menuName: "岗位修改",
          parentName: null,
          parentId: 104,
          orderNum: "3",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:post:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1024,
          menuName: "岗位删除",
          parentName: null,
          parentId: 104,
          orderNum: "4",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:post:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1025,
          menuName: "岗位导出",
          parentName: null,
          parentId: 104,
          orderNum: "5",
          path: "",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:post:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1026,
          menuName: "字典查询",
          parentName: null,
          parentId: 105,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dict:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1027,
          menuName: "字典新增",
          parentName: null,
          parentId: 105,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dict:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1028,
          menuName: "字典修改",
          parentName: null,
          parentId: 105,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dict:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1029,
          menuName: "字典删除",
          parentName: null,
          parentId: 105,
          orderNum: "4",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dict:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1030,
          menuName: "字典导出",
          parentName: null,
          parentId: 105,
          orderNum: "5",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:dict:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1031,
          menuName: "参数查询",
          parentName: null,
          parentId: 106,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:config:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1032,
          menuName: "参数新增",
          parentName: null,
          parentId: 106,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:config:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1033,
          menuName: "参数修改",
          parentName: null,
          parentId: 106,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:config:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1034,
          menuName: "参数删除",
          parentName: null,
          parentId: 106,
          orderNum: "4",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:config:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1035,
          menuName: "参数导出",
          parentName: null,
          parentId: 106,
          orderNum: "5",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:config:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1036,
          menuName: "公告查询",
          parentName: null,
          parentId: 107,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:notice:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1037,
          menuName: "公告新增",
          parentName: null,
          parentId: 107,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:notice:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1038,
          menuName: "公告修改",
          parentName: null,
          parentId: 107,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:notice:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1039,
          menuName: "公告删除",
          parentName: null,
          parentId: 107,
          orderNum: "4",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "system:notice:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 500,
          menuName: "操作日志",
          parentName: null,
          parentId: 108,
          orderNum: "1",
          path: "operlog",
          component: "monitor/operlog/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:operlog:list",
          icon: "form",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:44",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 501,
          menuName: "登录日志",
          parentName: null,
          parentId: 108,
          orderNum: "2",
          path: "logininfor",
          component: "monitor/logininfor/index",
          isFrame: "1",
          isCache: "0",
          menuType: "C",
          visible: "0",
          status: "1",
          perms: "monitor:logininfor:list",
          icon: "logininfor",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1046,
          menuName: "在线查询",
          parentName: null,
          parentId: 109,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:online:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1047,
          menuName: "批量强退",
          parentName: null,
          parentId: 109,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:online:batchLogout",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1048,
          menuName: "单条强退",
          parentName: null,
          parentId: 109,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:online:forceLogout",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1049,
          menuName: "任务查询",
          parentName: null,
          parentId: 110,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:job:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1050,
          menuName: "任务新增",
          parentName: null,
          parentId: 110,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:job:add",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1051,
          menuName: "任务修改",
          parentName: null,
          parentId: 110,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:job:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1052,
          menuName: "任务删除",
          parentName: null,
          parentId: 110,
          orderNum: "4",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:job:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1053,
          menuName: "状态修改",
          parentName: null,
          parentId: 110,
          orderNum: "5",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:job:changeStatus",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1054,
          menuName: "任务导出",
          parentName: null,
          parentId: 110,
          orderNum: "7",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:job:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1055,
          menuName: "生成查询",
          parentName: null,
          parentId: 115,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "tool:gen:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1056,
          menuName: "生成修改",
          parentName: null,
          parentId: 115,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "tool:gen:edit",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1058,
          menuName: "导入代码",
          parentName: null,
          parentId: 115,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "tool:gen:import",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1057,
          menuName: "生成删除",
          parentName: null,
          parentId: 115,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "tool:gen:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1059,
          menuName: "预览代码",
          parentName: null,
          parentId: 115,
          orderNum: "4",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "tool:gen:preview",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1060,
          menuName: "生成代码",
          parentName: null,
          parentId: 115,
          orderNum: "5",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "tool:gen:code",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1040,
          menuName: "操作查询",
          parentName: null,
          parentId: 500,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:operlog:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1041,
          menuName: "操作删除",
          parentName: null,
          parentId: 500,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:operlog:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1042,
          menuName: "日志导出",
          parentName: null,
          parentId: 500,
          orderNum: "4",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:operlog:export",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1043,
          menuName: "登录查询",
          parentName: null,
          parentId: 501,
          orderNum: "1",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:logininfor:query",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1044,
          menuName: "登录删除",
          parentName: null,
          parentId: 501,
          orderNum: "2",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:logininfor:remove",
          icon: "#",
          children: [],
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:45",
          updateBy: null,
          updateTime: null,
          remark: null,
          params: {},
          menuId: 1045,
          menuName: "日志导出",
          parentName: null,
          parentId: 501,
          orderNum: "3",
          path: "#",
          component: "",
          isFrame: "1",
          isCache: "0",
          menuType: "F",
          visible: "0",
          status: "1",
          perms: "monitor:logininfor:export",
          icon: "#",
          children: [],
        },
      ],
    },
  };
});

router.post("/system/menu", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/menu", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/menu", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.get("/system/user/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 2,
      list: [
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: "管理员",
          params: {},
          deptName: "研发部",
          userId: 1,
          deptId: 103,
          userName: "admin",
          nickName: "天龙",
          email: "ry@163.com",
          phonenumber: "15888888888",
          sex: "1",
          avatar: "",
          salt: null,
          status: "1",
          delFlag: "0",
          loginIp: "59.37.56.202",
          loginDate: "2021-05-31T12:59:37.000+0800",
          dept: {
            searchValue: null,
            createBy: null,
            createTime: null,
            updateBy: null,
            updateTime: null,
            remark: null,
            params: {},
            deptId: 103,
            parentId: null,
            ancestors: null,
            deptName: "研发部门",
            orderNum: null,
            leader: "天龙",
            phone: null,
            email: null,
            status: null,
            delFlag: null,
            parentName: null,
            children: [],
          },
          roleIds: [2],
          postIds: [1, 2],
          admin: true,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: "测试员",
          params: {},
          userId: 2,
          deptId: 105,
          userName: "ry",
          nickName: "天龙",
          email: "ry@qq.com",
          phonenumber: "15666666666",
          sex: "1",
          avatar: "",
          salt: null,
          status: "0",
          delFlag: "0",
          loginIp: "175.10.25.2",
          loginDate: "2021-05-31T11:41:41.000+0800",
          dept: {
            searchValue: null,
            createBy: null,
            createTime: null,
            updateBy: null,
            updateTime: null,
            remark: null,
            params: {},
            deptId: 105,
            parentId: null,
            ancestors: null,
            deptName: "测试部门",
            orderNum: null,
            leader: "天龙",
            phone: null,
            email: null,
            status: null,
            delFlag: null,
            parentName: null,
            children: [],
          },
          roleIds: [2],
          postIds: [2],
          admin: false,
        },
      ],
      code: 200,
      msg: "查询成功",
    },
  };
});

router.post("/system/user", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/user", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/user", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});
router.get("/system/rolesOrPosts", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      roles: [
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "普通角色",
          params: {},
          roleId: 2,
          roleName: "普通角色",
          roleKey: "common",
          roleSort: "2",
          dataScope: "2",
          menuCheckStrictly: true,
          deptCheckStrictly: true,
          status: "0",
          delFlag: "0",
          flag: false,
          menuIds: null,
          deptIds: null,
          admin: false,
        },
      ],
      posts: [
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:42",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 1,
          postCode: "ceo",
          postName: "董事长",
          postSort: "1",
          status: "0",
          flag: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 2,
          postCode: "se",
          postName: "项目经理",
          postSort: "2",
          status: "0",
          flag: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 3,
          postCode: "hr",
          postName: "人力资源",
          postSort: "3",
          status: "0",
          flag: false,
        },
        {
          searchValue: null,
          createBy: "admin",
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "",
          params: {},
          postId: 4,
          postCode: "user",
          postName: "普通员工",
          postSort: "4",
          status: "0",
          flag: false,
        },
      ],
    },
  };
});

router.get("/system/role/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 2,
      list: [
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "超级管理员",
          params: {},
          roleId: 1,
          roleName: "超级管理员",
          roleKey: "admin",
          roleSort: "1",
          dataScope: "1",
          menuCheckStrictly: true,
          deptCheckStrictly: true,
          status: "1",
          delFlag: "0",
          flag: false,
          menuIds: [1],
          deptIds: null,
          admin: true,
        },
        {
          searchValue: null,
          createBy: null,
          createTime: "2020-11-20 19:29:43",
          updateBy: null,
          updateTime: null,
          remark: "普通角色",
          params: {},
          roleId: 2,
          roleName: "普通角色",
          roleKey: "common",
          roleSort: "2",
          dataScope: "2",
          menuCheckStrictly: true,
          deptCheckStrictly: true,
          status: "0",
          delFlag: "0",
          flag: false,
          menuIds: null,
          deptIds: null,
          admin: false,
        },
      ],
    },
  };
});

router.post("/system/role", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/system/role", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/system/role", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});
router.get("/shopDecoration/list", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
    data: {
      total: 2,
      list: [
        {
          pageName: "首页",
          pageCode: "1000221",
          status: "1",
          createTime: "2020-11-20 19:29:43",
          updateTime: "2020-11-20 19:29:43",
        },
        {
          pageName: "个人中心",
          pageCode: "1000222",
          createTime: "2020-11-20 19:29:43",
          status: "1",
          updateTime: "2020-11-20 19:29:43",
        },
      ],
    },
  };
});

router.post("/shopDecoration", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.put("/shopDecoration", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

router.delete("/shopDecoration", async (ctx) => {
  ctx.body = {
    success: true,
    code: "000000",
    message: "成功",
  };
});

app.use(router.routes());
app.use(router.allowedMethods());

app.listen(7878, () => {
  console.log("服务已启动端口:7878");
});
